home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d1 / dosref19.arc / BOOTREC < prev    next >
Encoding:
Text File  |  1991-06-07  |  5.2 KB  |  70 lines

  1. ┌──────────────────────────────────────────────────────────────────────────────┐
  2. │                        D O S   B O O T   R E C O R D                         │
  3. ├───┬───────┬──────────────────────────────────────────────────────────────────┤
  4. │00h│3 bytes│  JMP to executable code. For DOS 2.x, 3 byte near jump (0E9h).   │
  5. │   │       │  For DOS 3.x, 2 byte near jump (0EBh) followed by a NOP (90h)    │
  6. ├───┼───────┼──────────────────────────────────────────────────────────────────┤
  7. │03h│8 bytes│  optional OEM name and version  (such as IBM 2.1)                │
  8. ├───┼───────┼──────────────────────────────────────────────────────────────────┤
  9. │0Bh│2 bytes│  bytes per sector                                                │
  10. ├───┼───────┼─────┬────────────────────────────────────────────────────────────┤
  11. │0Dh│ byte  │     │  sectors per allocation unit (must be a power of 2)        │
  12. ├───┼───────┤     ├────────────────────────────────────────────────────────────┤
  13. │0Eh│2 bytes│  B  │  reserved sectors (starting at logical sector 0)           │
  14. │   │       │     │  01 for 1.x-3.31, 02 for 4.0+                              │
  15. ├───┼───────┤     ├────────────────────────────────────────────────────────────┤
  16. │10h│ byte  │     │  number of FATs                                            │
  17. ├───┼───────┤     ├────────────────────────────────────────────────────────────┤
  18. │11h│2 bytes│     │  maximum number of root directory entries                  │
  19. ├───┼───────┤  P  ├────────────────────────────────────────────────────────────┤
  20. │13h│2 bytes│     │  number of sectors in logical image (total number of       │
  21. │   │       │     │  sectors in media, including boot sector directories, etc.)│
  22. │   │       │     │  If logical disk size is geater than 32Mb, this value is 0 │
  23. │   │       │     │  and the actual size is reported at offset 26h (DOS 4.0+)  │
  24. ├───┼───────┤     ├────────────────────────────────────────────────────────────┤
  25. │15h│ byte  │  B  │  media descriptor byte                                     │
  26. ├───┼───────┤     ├────────────────────────────────────────────────────────────┤
  27. │16h│2 bytes│     │  number of sectors occupied by a single FAT                │
  28. ├───┼───────┼─────┴────────────────────────────────────────────────────────────┤
  29. │18h│2 bytes│  sectors per track                                               │
  30. ├───┼───────┼──────────────────────────────────────────────────────────────────┤
  31. │1Ah│2 bytes│  number of heads                                                 │
  32. ├───┼───────┼──────────────────────────────────────────────────────────────────┤
  33. │1Ch│2 bytes│  # of hidden sectors  (sectors before this volume) (1st part)    │
  34. └───┴───────┼──────────────────────────────────────────────────────────────────┤
  35.             │                EXTENDED BOOT RECORD (DOS 4.0+)                   │
  36. ┌───┬───────┼──────────────────────────────────────────────────────────────────┤
  37. │1Eh│2 bytes│  # of hidden sectors  (sectors before this volume) (2nd part)    │
  38. ├───┼───────┼──────────────────────────────────────────────────────────────────┤
  39. │20h│4 bytes│  # sectors in this disk (see offset 13h, if 0)                   │
  40. ├───┼───────┼──────────────────────────────────────────────────────────────────┤
  41. │24h│2 bytes│  physical drive number (max 2 for DOS 4, max 8 for DOS 5)        │
  42. ├───┼───────┼──────────────────────────────────────────────────────────────────┤
  43. │26h│ byte  │  extended boot record signature  (29h)                           │
  44. ├───┼───────┼──────────────────────────────────────────────────────────────────┤
  45. │27h│4 bytes│  volume serial number (assigned with a random function)          │
  46. ├───┼───────┼──────────────────────────────────────────────────────────────────┤
  47. │2Bh│11 byte│  volume label                                                    │
  48. ├───┼───────┼──────────────────────────────────────────────────────────────────┤
  49. │36h│7 bytes│  file system ID   (FAT12   ), (FAT16   ) etc.     ("reserved")   │
  50. └───┴───────┴──────────────────────────────────────────────────────────────────┘
  51.  
  52.  The three words at the end return information about the media. The number of
  53. heads is useful for supporting different multihead drives that have the same
  54. storage capacity but a different number of surfaces. The number of hidden
  55. sectors is useful for drive partitioning schemes.
  56.  
  57.  DOS 3.2 uses a table called the BIOS Parameter Block (BPB) to determine if a
  58. disk has a valid File Allocation Table. The BPB is located in the first sector
  59. of a floppy disk. Although the BPB is supposed to be on every formatted floppy
  60. disk, some earlier versions of DOS did not create a BPB and instead assumed that
  61. the FAT begins at the second sector of the disk and that the first FAT byte
  62. (Media Descriptor Byte) describes the disk format.
  63.  DOS 3.2 reads in the whole of the BPB and tries to use it - although strangely
  64. enough, it seems as if DOS is prepared to cope with a BPB that is more or less
  65. totally blank (it seems to ignore the descriptor byte and treat it as a DSDD
  66. 9-sector disk).
  67.  DOS 3.2 determines if a disk has a valid boot sector by examining the first
  68. byte of logical sector 0. If that byte it a jump instruction 0E9h, DOS 3.2
  69. assumes the rest of the sector is a valid boot sector with a BPB. If the first
  70.